package com.zjitc.service;

import com.zjitc.model.Car;
import com.zjitc.model.CarItem;

import java.util.List;
import javax.servlet.http.HttpSession;

/**
 * Create by IntelliJ IDEA
 *
 * @author: lhl
 * @date-Time: 2018/4/5 0005
 * @description:
 */
public interface CarService {

    /**
     * 用户添加购物车内容
     *
     * @param uid
     * @param pid
     * @param count
     */
    void add(String uid, String pid, int count);

    /**
     * 返回某个用户的购物车内容列表
     *
     * @param uid
     * @return
     */
    List<CarItem> findAll(String uid);

    /**
     * 清空该用户的购物车
     *
     * @param uid
     */
    void clear(String uid);

    /**
     * 删除购物车中的某个商品
     *
     * @param pid
     * @param session
     */
    void delete(String pid, HttpSession session);
}
